/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.prepay.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.fixedexpense.FixedExpense;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 预付款Entity
 * @author wsm
 * @version 2021-03-18
 */
@Table(name="t_prepayment_estimated", alias="a", columns={
		@Column(name="prepayment_estimated_id", attrName="prepaymentEstimatedId", label="预计付款明细ID", isPK=true),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="car_name", attrName="carName", label="车辆名称"),
		@Column(name="prepayment_type", attrName="prepaymentType", label="预付款类型"),
		@Column(name="estimated_payment_amount", attrName="estimatedPaymentAmount", label="预计付款金额"),
		@Column(name="prepayment_id", attrName="prepaymentId.prepaymentId", label="预付款ID"),
		@Column(name="payment_sum_actual", attrName="paymentSumActual", label="实际付款合计"),
		@Column(name="payment_amount_actual", attrName="paymentAmountActual", label="已核销金额"),
		@Column(name="payment_amount_estimated", attrName="paymentAmountEstimated", label="未核销金额"),
		@Column(name="row_number", attrName="rowNumber", label="服务订单行号"),
	}, joinTable={
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= FixedExpense.class, attrName="fixedExpense", alias="b",
				on="b.fixed_expense_id = a.prepayment_type", columns={
				@Column(name="fixed_expense_id", label="类型id", isPK=true),
				@Column(name="fixed_expense_name", label="类型名称"),
		}),
},orderBy="a.prepayment_estimated_id ASC"
)
public class TprepaymentEstimated extends DataEntity<TprepaymentEstimated> {

	private static final long serialVersionUID = 1L;
	private String prepaymentEstimatedId;		// 预计付款明细ID
	private String frameNumber;		// 车架号
	private String carName;		// 车辆名称
	private String prepaymentType;		// 预付款类型
	private Double estimatedPaymentAmount;		// 预计付款金额
	private Tprepayment prepaymentId;		// 预付款ID 父类
	private Double paymentSumActual;		// 实际付款合计
	private Double paymentAmountActual;		// 已核销金额
	private Double paymentAmountEstimated;		// 未核销金额
	private String prepaymentTypeName;
	private Long rowNumber;		// 服务订单行号
    private String prepaymentCode;
	private FixedExpense fixedExpense;
	private Date date; //日期
	private String dateStr;

	public FixedExpense getFixedExpense() {
		return fixedExpense;
	}

	public void setFixedExpense(FixedExpense fixedExpense) {
		this.fixedExpense = fixedExpense;
	}

	public String getPrepaymentCode() {
		return prepaymentCode;
	}

	public void setPrepaymentCode(String prepaymentCode) {
		this.prepaymentCode = prepaymentCode;
	}

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}

	public String getCarName() {
		return carName;
	}

	public void setCarName(String carName) {
		this.carName = carName;
	}

	public TprepaymentEstimated() {
		this(null);
	}

	public String getPrepaymentTypeName() {
		return prepaymentTypeName;
	}

	public void setPrepaymentTypeName(String prepaymentTypeName) {
		this.prepaymentTypeName = prepaymentTypeName;
	}

	public TprepaymentEstimated(Tprepayment prepaymentId){
		this.prepaymentId = prepaymentId;
	}

	public String getPrepaymentEstimatedId() {
		return prepaymentEstimatedId;
	}

	public void setPrepaymentEstimatedId(String prepaymentEstimatedId) {
		this.prepaymentEstimatedId = prepaymentEstimatedId;
	}

	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}


	public String getPrepaymentType() {
		return prepaymentType;
	}

	public void setPrepaymentType(String prepaymentType) {
		this.prepaymentType = prepaymentType;
	}

	public Double getEstimatedPaymentAmount() {
		return estimatedPaymentAmount;
	}

	public void setEstimatedPaymentAmount(Double estimatedPaymentAmount) {
		this.estimatedPaymentAmount = estimatedPaymentAmount;
	}

	@Length(min=0, max=64, message="预付款ID长度不能超过 64 个字符")
	public Tprepayment getPrepaymentId() {
		return prepaymentId;
	}

	public void setPrepaymentId(Tprepayment prepaymentId) {
		this.prepaymentId = prepaymentId;
	}

	public Double getPaymentSumActual() {
		return paymentSumActual;
	}

	public void setPaymentSumActual(Double paymentSumActual) {
		this.paymentSumActual = paymentSumActual;
	}

	public Double getPaymentAmountActual() {
		return paymentAmountActual;
	}

	public void setPaymentAmountActual(Double paymentAmountActual) {
		this.paymentAmountActual = paymentAmountActual;
	}

	public Double getPaymentAmountEstimated() {
		return paymentAmountEstimated;
	}

	public void setPaymentAmountEstimated(Double paymentAmountEstimated) {
		this.paymentAmountEstimated = paymentAmountEstimated;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getDateStr() {
		return dateStr;
	}

	public void setDateStr(String dateStr) {
		this.dateStr = dateStr;
	}
}
